import { RouteRecordRaw, createRouter, createWebHashHistory } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    redirect:'home',
    component: () => import(/* webpackChunkName: "home" */ '../views/index.vue'),
    children:[
      {
        path: '/home',
        name: 'home',
        component: () => import(/* webpackChunkName: "home" */ '../views/layout/body/overview/overview.vue'),
      },
      {
        path: '/home2',
        name: 'home2',
        component: () => import(/* webpackChunkName: "home" */ '../views/home/components/hello-world.vue'),
      },
      {
        path: '/shopping',
        name: 'shopping',
        component: () => import(/* webpackChunkName: "home" */ '../views/layout/body/shopping/shopping.vue'),
      },
      {
        path: '/about',
        name: 'about',
        component: () => import(/* webpackChunkName: "home" */ '../views/layout/body/about/about.vue'),
      },

    ]
  },


]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
